Page({
    data: {
        interval: 2000,
        duration: 1000,
        iphoneXheight: 85,
        icon_bottom: 650,
        arrow_top: 197,
        projectileFrame: true,
        projectileFrameHeight: 900,
        num: 1,
        index: 0,
        select_color_index: 0,
        current_color: 0,
        select_color: [{
            colorNum: '黄'
        }, {
            colorNum: '红'
        }, {
            colorNum: '白'
        }],
        select_size: [{
            colorNum_size: '300mm*300mm'
        }, {
            colorNum_size: '300mm*300mm'
        }, {
            colorNum_size: '300mm*300mm'
        }]
    },
    onLoad: function(options) {
        if (wx.getSystemInfoSync().model != "iPhone X") {
            this.setData({
                arrow_top: 160,
                icon_bottom: 400,
                iphoneXheight: 65,
                projectileFrameHeight: 590
            })
        }
        var that = this;
        let picList = [];
        picList.push('../../../../static/image/umbrella.png');
        picList.push('../../../../static/image/umbrella.png');
        picList.push('../../../../static/image/umbrella.png');
        that.setData({
            picList: picList
        })
        onShareAppMessage: (res) => {}
    },
    reserve() {
        this.setData({
            projectileFrame: false
        })
    },
    add() {
        var that = this;
        var _Num = that.data.num + 1;
        that.setData({
            num: _Num
        })
    },
    reduce() {
        var that = this;
        if (that.data.num > 1) {
            var _Num = that.data.num - 1;
            that.setData({
                num: _Num
            })
        } else {
            return;
        }
    },
    close() {
        var that = this;
        that.setData({
            projectileFrame: true
        })
        wx.navigateTo({
            url: '../../CommodityReservation/CommodityReservation',
        })
    },
    swiperColor(e) {
        // this.setData({
        //     select_color_index: e.detail.current
        // })
    }
})